package com.example.lbstest.mapper;

import com.example.lbstest.pojo.Card;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Component;

import java.util.List;

@Mapper
@Component
public interface CardMapper {
    //Mapper.java和Mapper.xml对应
    int insertOneCard(Card card);
    int setStatus(String id);
    int punchCardDelay(String code,String class_number);
    int punchCardIn(String code,String class_number);
    //延迟操作
    int delayTimeUpdate(String code,String class_number);
    int delayTimeInsert(String code,String class_number,String time);
    int insertPunchCard(String student_number,String class_number,String code,String time,String status);
    List<Card> getCardList(String teacher_code);
    Card getCard(String class_number,String code);
    // 防止重复打卡
    String selectPunchCard(String class_number,String student_number,String code);

    int updateOneCardWhere(String class_number,String student_number,String code);
    int insertPunchCardAndAsk(String class_number,String student_number,String code,String time);
    int punchCardAskOne(String class_number,String code);
    int punchCardAskTwo(String class_number,String code);
}
